package com.cloud.wms.ui.main.entity;

import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;

import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author:Chen
 * @Date: 2021-01-18 18:24
 * @Description:
 */
public class TaskMemberEntity extends BaseExpandNode {
    private long MemberID;
    private String MemberName;
    private List<TaskEntity> taskList;

    public long getMemberID() {
        return MemberID;
    }

    public void setMemberID(long memberID) {
        MemberID = memberID;
    }

    public String getMemberName() {
        return MemberName == null ? "" : MemberName;
    }

    public void setMemberName(String memberName) {
        MemberName = memberName;
    }

    public void setChildNode(List<TaskEntity> taskList) {
        this.taskList = taskList;
    }

    @Nullable
    @Override
    public List<BaseNode> getChildNode() {
        ArrayList<BaseNode> baseNodes = new ArrayList<>();
        for (int i = 0; i < taskList.size(); i++) {
            TaskEntity entity = taskList.get(i);
            baseNodes.add(entity);
        }
        return baseNodes;
    }
}
